<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width,initial-scale=1.0 minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
    <title>结果分析</title>
    <!--css-->
    <link href="public/css/header.css" rel="stylesheet" type="text/css">
    <link href="public/css/container.css" rel="stylesheet" type="text/css">
    <link href="public/css/call_back.css" rel="stylesheet" type="text/css">
    <!--js-->
    <script src="../public/jQuery/jQuery-2.1.3.min.js"></script>
    <script src="../public/js/publicjs.js"></script>
    <script src="public/js/myjs/whole.js"></script>
    <script src="public/js/highcharts.js"></script>
    <style>
        /*tspan{*/
        /*white-space:normal;*/
        /*}*/
        .container.title {
            position: relative;
            background: #EDF0F0;
            color: #323232;
            height: 7vh;
            line-height: 7vh;
            font-size: 2.8125vh;
            /*height: 7.5rem;*/
            /*line-height: 7.5rem;*/
            /*font-size: 3rem;*/
        }

        .pie_container {
            width: 100%;
            height: 55vh;
            /*height: 58.6667rem;*/
            margin-top: 3vh;
            /*margin-top: 3.2rem;*/
        }

        .column_container {
            width: 94%;
            margin-left: 3%;

            height: 55vh;
            /*height: 58.6667rem;*/
            margin-top: 3vh;
            /*margin-top: 3.2rem;*/
        }

        .line_container {
            position: relative;
            width: 90%;
            margin-left: 5%;
            height: 55vh;
            /*height: 58.6667rem;*/
            margin-top: 3vh;
            /*margin-top: 3.2rem;*/
        }

        .line_container .shelter {
            position: absolute;
            width: 4rem;
            height: 9rem;
            background: white;
            z-index: 99;
        }

        .other_container {
            width: 100%;
            margin-top: 3vh;
            /*margin-top: 3.2rem;*/
        }

        ._title {
            /*font-size: 2.833rem;*/
            font-size: 2.65625vh;
        }

        table {
            margin: 0 auto;
            width: 94%;
            border: solid #808080;
            border-width: 1px 0px 0px 1px;
            text-align: left;
        }

        table + table {
            border-top: 0px solid #808080;
            background: #FCF0C0;
        }

        td, th {
            border: solid #808080;
            border-width: 0px 1px 1px 0px;
            padding: 5px 20px;
            overflow: hidden;
            height: 5.4vh;
            /*height: 5.8333rem;*/
        }

        .even {
            background: #FFF;
        }

        .odd {
            background: #F0F0F0;
        }

        .out_suspension {
            white-space: nowrap;
            -webkit-line-clamp: 1;
            -webkit-box-orient: vertical;
            text-overflow: ellipsis;
            overflow: hidden;
            width: 80vw;
        }

        .title_big {
            line-height: 4vh;
        }

    </style>
</head>
<body>
<header>

    <!--头部-->
    <div class="header__box tl">

        <img onclick="goback()" src="public/img/basic/back.png"/>
        <span onclick="goback()" class="back">返回</span>

    </div>
    <div class="header__box tc header__box__title">
        结果分析
    </div>

    <div class="call_back">
        <div class="content_big">
            <div class="popup_similar title_big" style="padding: 3vh; ">

            </div>
        </div>
    </div>

</header>
<section>

    <div class="container title">
        <span>
            大学生学习生活状况调查问卷
        </span>
    </div>
    <div style="position: relative;text-align: center;">
        <img class="loading" src='public/img/basic/loading.gif'>
    </div>

    <div class="answer_list">
    </div>

</section>

</body>
</html>

<script type="application/javascript">
    $(function () {

//        路由解析
        $.getUrlParam = function (name) {
            var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
            var r = window.location.search.substr(1).match(reg);
            if (r != null) return unescape(r[2]);
            return null;
        };
        var questionnaire_id = $.getUrlParam('questionnaire_id');
        var questionnaire_name = unescape($.getUrlParam('questionnaire_name'));
        $('.container span').text(questionnaire_name);

        $('.call_back').click(function () {
            $(this).css('display', 'none');
        });

        //如果已经发布了,就

        //API调用,请求数据
        API_Func('/questionnaires/' + questionnaire_id + '/feedback', 'GET', {id: questionnaire_id}, true, function () {


        }, function (d) {
            var data = d.data;

            var html = '';
            var answerCount = 0;
            if (data.length > 0) {
                for (var i = 0; i < data.length; i++) {
                    answerCount += data[i].answer_count;
                }
            }

            if (data.length > 0 && answerCount > 0) {
                var series = [];
                for (var i = 0; i < data.length; i++) {

                    //单选-饼图
                    if (data[i].question_type == 0) {
                        var html = '';
                        //拿到选项数组
                        var question_options_array = data[i].question_options.split(',');
                        //拿到答案数组
                        var answer_result = data[i].answer_result;

                        var is_answer = false;
                        for (var q = 0; q < answer_result.length; q++) {
                            if (answer_result[q] > 0) {
                                is_answer = true;
                                break;
                            }
                        }
                        //判断选项是否和答案数组的长度是一样的
                        if (question_options_array.length == answer_result.length) {

                            for (var j = 0; j < question_options_array.length; j++) {

                                var name = question_options_array[j];//获取选项名称
                                var name2 = name;//获取选项名称
                                if (name2.length > 5) {
                                    name2 = name2.substr(0, 4);
                                    name2 += "...";
                                }
                                var y = answer_result[j];//获取该选项的值

                                var pie_data = {
                                    name: y,
                                    y: y,
                                    name2: name2,
                                    name3: name
                                };
                                series.push(pie_data);
                            }
                        }

                        var container_id = "container" + i;

                        html += ' <div class="column_container" id="' + container_id + '"></div>' +
                                '<div style="position: relative;display: none;">' +
                                '<table class="table_even_odd" border="0" cellspacing="0" cellpadding="0">' +
                                '<thead class="even">' +
                                '<tr>' +
                                '<th>答案选项' +
                                '</th>' +
                                '<th>回复情况' +
                                '</th>' +
                                '</tr>' +
                                '</thead>' +
                                '<tbody class="need">';
                        for (var k = 0; k < series.length; k++) {
                            if (k % 2 == 0) {
                                html += '<tr class="odd"><td>' + series[k].name3 + '</td><td>' + series[k].y + '</td></tr>';
                            }
                            else {
                                html += '<tr class="even"><td>' + series[k].name3 + '</td><td>' + series[k].y + '</td></tr>';
                            }
                        }
                        html += '</tbody>' +
                                '</table>' +
                                '<table border="0" cellspacing="0" cellpadding="0">' +
                                '<tbody>' +
                                '<tr>' +
                                '<td>受访人数:' + data[i].answer_count +
                                '</td>' +
                                '</tr>' +
                                '</tbody>' +
                                '</table>' +
                                '</div>';

                        $('.answer_list').append(html);

                        //饼图配置

                        //一级标题
                        var title = "Q" + (i + 1) + ":" + data[i].question_body;
                        //二级标题
                        var subtitle = '答题人数' + data[i].answer_count;

                        //饼图对象
                        var obj = '.answer_list ' + '#' + container_id;

                        var size = "2.83rem";
                        if (title.length >= 20) {
                            size = "2.5rem";
                        }
                        if (is_answer) {
                            $(obj).next().css('display', 'block');
                            pie_success_option(obj, title, subtitle, series, size);
                        }
                        else {
                            when_no_answer_show((i + 1), data[i].question_body, obj);
                        }

                    }
                    //多选-柱状图
                    else if (data[i].question_type == 1) {

                        //拿到选项数组
                        var question_options_array = data[i].question_options.split(',');
                        //拿到答案数组
                        var answer_result = data[i].answer_result;

                        //判断是否有人回答
                        var is_answer = false;
                        for (var q = 0; q < answer_result.length; q++) {
                            if (answer_result[q] > 0) {
                                is_answer = true;
                                break;
                            }
                        }

                        //判断选项是否和答案数组的长度是一样的
                        if (question_options_array.length == answer_result.length) {

                            for (var j = 0; j < question_options_array.length; j++) {

                                var name = question_options_array[j];//获取选项名称
                                var y = answer_result[j];//获取该选项的值

                                var pie_data = {
                                    name: name,
                                    y: y
                                };
                                series.push(pie_data);
                            }
                        }

                        var container_id = "container" + i;

                        //有人回答过
                        var html = '';
                        html += ' <div class="column_container" id="' + container_id + '"></div>' +
                                '<div style="position: relative;display: none;">' +
                                '<table class="table_even_odd" border="0" cellspacing="0" cellpadding="0">' +
                                '<thead  class="even">' +
                                '<tr>' +
                                '<th>答案选项' +
                                '</th>' +
                                '<th>回复情况' +
                                '</th>' +
                                '</tr>' +
                                '</thead>' +
                                '<tbody class="need">';
                        for (var k = 0; k < series.length; k++) {
                            if (k % 2 == 0) {
                                html += '<tr class="odd"><td>' + series[k].name + '</td><td>' + series[k].y + '</td></tr>';
                            }
                            else {
                                html += '<tr class="even"><td>' + series[k].name + '</td><td>' + series[k].y + '</td></tr>';
                            }

                        }
                        html += '</tbody>' +
                                '</table>' +
                                '<table border="0" cellspacing="0" cellpadding="0">' +
                                '<tbody>' +
                                '<tr>' +
                                '<td>受访人数:' + data[i].answer_count +
                                '</td>' +
                                '</tr>' +
                                '</tbody>' +
                                '</table>' +
                                '</div>';


                        $('.answer_list').append(html);
                        //饼图配置

                        //一级标题
                        var title = "Q" + (i + 1) + ":" + data[i].question_body;
                        //二级标题
                        var subtitle = '答题人数' + data[i].answer_count;
                        //饼图对象
                        var obj = '.answer_list ' + '#' + container_id;
                        var size = "2.83rem";
                        if (title.length >= 20) {
                            size = "2.5rem";
                        }

                        if (is_answer) {
                            $(obj).next().css('display', 'block');
                            column_success_option(obj, title, subtitle, question_options_array, answer_result, series, size, data[i].select_limit);
                        }
                        else {
                            when_no_answer_show((i + 1), data[i].question_body, obj);
                        }

                    }
                    //填空
                    else if (data[i].question_type == 2) {
                        //拿到答案数组
                        var answer_result = data[i].answer_result;

                        var html = '';
                        if (answer_result.length > 0) {
                            html += '<div class="other_container">' +
                                    '<div style="text-align: center;color: #323232;padding: 10px;"><span class="_title">' + "Q" + (i + 1) + ":" + data[i].question_body + '</span></div>' +
                                    '<table class="table_even_odd" border="0" cellspacing="0" cellpadding="0">' +
                                    '<thead  class="even">' +
                                    '<tr>' +
                                    '<th style="color: #B2B2B2;">答案' +
                                    '</th>' +
                                    '</tr>' +
                                    '</thead>' +
                                    '<tbody class="need">';
                            for (var k = 0; k < answer_result.length; k++) {
                                if (k % 2 == 0) {
                                    html += '<tr class="clickshow odd"><td><div class="out_suspension">' + answer_result[k] + '</div></td></tr>';
                                }
                                else {
                                    html += '<tr class="clickshow even"><td><div class="out_suspension">' + answer_result[k] + '</div></td></tr>';
                                }
                            }
                            html += '</tbody>' +
                                    '</table>' +
                                    '<table border="0" cellspacing="0" cellpadding="0">' +
                                    '<tbody>' +
                                    '<tr>' +
                                    '<td>受访人数:' + data[i].answer_count +
                                    '</td>' +
                                    '</tr>' +
                                    '</tbody>' +
                                    '</table>' +
                                    '</div>';

                            $('.answer_list').append(html);

                            $('tr.clickshow').unbind('click').on('click', function () {
                                var thishtml = $(this).find('div').html();
                                $('.popup_similar').html(thishtml);
                                $('.call_back').show();
                            });
                        }
                        else {
                            html += '<div class="other_container">' +
                                    '<div style="text-align: center;font-size: 2.65625vh;">' + "Q" + (i + 1) + ":" + data[i].question_body + '</div>' +
                                    '<div style="text-align: center;line-height: 55vh;">该题无答案数据</div>' +
                                    '</div>';
                            $('.answer_list').append(html);
                        }

                    }
                    //打分题
                    else if (data[i].question_type == 3) {

                        //各个选项的分布
                        var mark_distribute = data[i].mark_distribute;

                        //拿到答案数组
                        var answer_result = data[i].answer_result;

                        //判断是否有人回答
                        var is_answer = false;
                        for (var q = 0; q < answer_result.length; q++) {
                            if (answer_result[q] > 0) {
                                is_answer = true;
                                break;
                            }
                        }

                        //求平均值
                        var sum = 0;
                        for (var q = 0; q < answer_result.length; q++) {
                            sum += parseInt(answer_result[q]);
                        }
                        var avg = fomatFloat(sum / answer_result.length, 1);

                        var container_id = "container" + i;


                        //数组一是用来纪录分数展示,
                        var arr1 = [];
                        for (var item in mark_distribute) {
                            arr1.push(mark_distribute[item])
                        }
                        arr1.splice(0, 0, "请打分");
                        arr1.push(avg);


                        //数组二是用来纪录每个分打分的人数
                        var arr2 = [], arr3 = [];
//                        arr3.push(0);
                        for (var item in mark_distribute) {
                            arr2.push(item + "分");
                            arr3.push(parseInt(item));
                        }

                        arr2.splice(0, 0, "");
                        arr2.push('平均分');

                        arr3.splice(0, 0, 0);

                        if (arr3.length > 0) {
                            var max_arr3 = arr3[0];
                            for (var item in arr3) {
                                if (parseInt(item) > parseInt(max_arr3)) {
                                    max_arr3 = item;
                                }
                            }
                            arr3.push(parseInt(max_arr3) + 1);
                        }
//                        console.log(arr3);

                        var html = '';
                        html += ' <div  class="line_container" id="' + container_id + '"></div>' +
                                '<div style="position: relative;display: none;">' +
                                '<table class="table_even_odd" border="0" cellspacing="0" cellpadding="0">' +
                                '<tbody>';

                        html += '<tr>';
                        for (var w = 0; w < arr2.length; w++) {
                            html += '<td class="tc" style="padding: 2px;">' + arr2[w] + '</td>';
                        }
                        html += '<tr>';
                        for (var w = 0; w < arr1.length; w++) {
                            html += '<td class="tc" style="padding: 2px;">' + arr1[w] + '</td>';
                        }
                        html += '</tr>';

                        html += '</tbody>' +
                                '</table>' +
                                '<table border="0" cellspacing="0" cellpadding="0">' +
                                '<tbody>' +
                                '<tr>' +
                                '<td>受访人数:' + data[i].answer_count +
                                '</td>' +
                                '</tr>' +
                                '</tbody>' +
                                '</table>' +
                                '</div>';

                        $('.answer_list').append(html);

                        //一级标题
                        var title = "Q" + (i + 1) + ":" + data[i].question_body;
                        //二级标题
                        var subtitle = '答题人数' + data[i].answer_count;
                        //饼图对象
                        var obj = '.answer_list ' + '#' + container_id;

                        var answer_result_2 = [];
                        for (var x in answer_result) {
                            answer_result_2.push(parseInt(answer_result[x]));
                        }
                        var size = "2.83rem";
                        if (title.length >= 20) {
                            size = "2.5rem";
                        }
                        if (is_answer) {
                            $(obj).next().css('display', 'block');
                            line_success_option(obj, title, subtitle, answer_result_2, avg, size, arr3);
                        }
                        else {
                            when_no_answer_show((i + 1), data[i].question_body, obj);
                        }

                        $(obj).prepend("<div class='shelter'></div>");

                    }
                    //日期题
                    else if (data[i].question_type == 4) {

                        //拿到答案数组
                        var answer_result = data[i].answer_result;

                        var html = '';
                        if (answer_result.length > 0) {
                            html += '<div class="other_container">' +
                                    '<div style="text-align: center;color: #323232;padding: 10px;"><span class="_title">' + "Q" + (i + 1) + ":" + data[i].question_body + '</span></div>' +
                                    '<table class="table_even_odd" border="0" cellspacing="0" cellpadding="0">' +
                                    '<thead  class="even">' +
                                    '<tr>' +
                                    '<th style="color: #B2B2B2;">日期' +
                                    '</th>' +
                                    '</tr>' +
                                    '</thead>' +
                                    '<tbody class="need">';
                            for (var k = 0; k < answer_result.length; k++) {
                                if (k % 2 == 0) {
                                    html += '<tr class="odd"><td>' + answer_result[k] + '</td></tr>';
                                }
                                else {
                                    html += '<tr class="even"><td>' + answer_result[k] + '</td></tr>';
                                }

                            }
                            html += '</tbody>' +
                                    '</table>' +
                                    '<table border="0" cellspacing="0" cellpadding="0">' +
                                    '<tbody>' +
                                    '<tr>' +
                                    '<td>受访人数:' + data[i].answer_count +
                                    '</td>' +
                                    '</tr>' +
                                    '</tbody>' +
                                    '</table>' +
                                    '</div>';

                            $('.answer_list').append(html);
                        }
                        else {
                            html += '<div class="other_container">' +
                                    '<div style="text-align: center;font-size: 2.65625vh;">' + "Q" + (i + 1) + ":" + data[i].question_body + '</div>' +
                                    '<div style="text-align: center;line-height: 55vh;">该题无答案数据</div>' +
                                    '</div>';
                            $('.answer_list').append(html);
                        }

                    }
                    //时间题
                    else if (data[i].question_type == 5) {
                        //拿到答案数组
                        var answer_result = data[i].answer_result;

                        var html = '';
                        if (answer_result.length > 0) {
                            html += '<div class="other_container">' +
                                    '<div style="text-align: center;color: #323232;padding: 10px;"><span class="_title">' + "Q" + (i + 1) + ":" + data[i].question_body + '</span></div>' +
                                    '<table class="table_even_odd" border="0" cellspacing="0" cellpadding="0">' +
                                    '<thead class="even">' +
                                    '<tr>' +
                                    '<th style="color: #B2B2B2;">时间' +
                                    '</th>' +
                                    '</tr>' +
                                    '</thead>' +
                                    '<tbody class="need">';
                            for (var k = 0; k < answer_result.length; k++) {
                                if (k % 2 == 0) {
                                    html += '<tr class="odd"><td>' + answer_result[k] + '</td></tr>';
                                }
                                else {
                                    html += '<tr class="even"><td>' + answer_result[k] + '</td></tr>';
                                }

                            }
                            html += '</tbody>' +
                                    '</table>' +
                                    '<table border="0" cellspacing="0" cellpadding="0">' +
                                    '<tbody>' +
                                    '<tr>' +
                                    '<td>受访人数:' + data[i].answer_count +
                                    '</td>' +
                                    '</tr>' +
                                    '</tbody>' +
                                    '</table>' +
                                    '</div>';

                            $('.answer_list').append(html);
                        }
                        else {
                            html += '<div class="other_container">' +
                                    '<div style="text-align: center;font-size: 2.65625vh;">' + "Q" + (i + 1) + ":" + data[i].question_body + '</div>' +
                                    '<div style="text-align: center;line-height: 55vh;">该题无答案数据</div>' +
                                    '</div>';
                            $('.answer_list').append(html);
                        }
                    }
                }
            }

            else {
                $('.title').css('display', 'none');
                html += '<div style="position: relative;width:16.7rem;height: 20.7rem;top:23rem; text-align: center;margin: 0 auto;">' +
                        '<img style="width: 100%;height: 100%;" src="public/img/result/no_result.png"></div>';
                $('.answer_list').append(html);
            }

        }, function (d) {
            pop_up_fn($('.pop-up'), '服务器请求失败');
        });

        //无答案时展示
        function when_no_answer_show(id, title, obj) {
            var html2 = '';
            html2 += '<div style="text-align: center;font-size: 2.65625vh;">Q' + (id) + ':' + title + '</div>' +
                    '<div style="text-align: center;line-height: 55vh;">该题无答案数据</div>';
            $(obj).append(html2);

        }

        //单选调用方法
        function pie_success_option(obj, title, subtitle, series, size) {

            $(obj).highcharts({
                chart: {
                    type: 'pie'
                },
                title: {
                    text: title,
                    style: {
                        fontSize: size
                    }
                },
                subtitle: {
                    text: subtitle,
                    style: {
                        fontSize: "2.1667rem"
                    }
                },
                tooltip: {
                    enabled: false
                },
                plotOptions: {
                    pie: {
                        allowPointSelect: false,
                        dataLabels: {
                            enabled: true,
                            style: {
                                fontSize: "2.1667rem"
                            }
                        },
                        showInLegend: true,   //图例显示
                        point: {
                            events: {
                                legendItemClick: function (e) {
                                    return false; // 直接 return false 即可禁用图例点击事件
                                }
                            }
                        }
                    }
                },
                legend: {
                    labelFormatter: function () {
                        return this.name2;
                    },
                    itemMarginTop: 0, //图例与上面图之间的间距
                    itemStyle: {cursor: 'pointer', fontSize: '1.5em'}, //图例大小
                    symbolPadding: 10,  //图例内间距
                    itemDistance: 20    //图例与图例之间的间距
                },
                series: [{
                    name: '',
                    colorByPoint: true,
                    data: series
                }],
                credits: {
                    enabled: false // 禁用版权信息
                }
            });

            //清空数组
            series.splice(0, series.length);
        }

        //多选调用方法
        function column_success_option(obj, title, subtitle, question_options_array, answer_result, series, size, y) {
            $(obj).highcharts({
                chart: {
                    type: 'column'
                },
                title: {
                    text: title,
                    style: {
                        fontSize: size,
                        margin: "1.5rem"
                    }
                },
                subtitle: {
                    text: subtitle,
                    style: {
                        fontSize: "2.1667rem"
                    }
                },
                tooltip: {
                    enabled: false
                },
                xAxis: {
                    categories: question_options_array,
                    labels: {
                        style: {
                            fontSize: '1em'
                        }
                    },
                    gridLineWidth: 0,
                    tickLength: 0,
                    lineColor: '#646464'
                },
                yAxis: {
                    type: 'linear',
                    labels: {
                        style: {
//                            fontSize:'2.1667rem'
                        }
                    },
                    title: {
                        text: null
                    },
                    gridLineWidth: 0,
                    lineWidth: 1,
                    lineColor: '#646464',
                    tickInterval: 1
//                    tickPositions:y
                },
                series: [{
                    name: '',
                    colorByPoint: true,
                    data: answer_result,
                    showInLegend: false
                }],

                credits: {
                    enabled: false // 禁用版权信息
                }
            });

            //清空数组
            series.splice(0, series.length);
        }

        //打分调用方法
        function line_success_option(obj, title, subtitle, answer_result, avg, size, arr3) {

            $(obj).highcharts({
                chart: {
                    type: 'line'
                },
                title: {
                    text: title,
                    style: {
                        fontSize: size
                    }
                },
                subtitle: {
                    text: subtitle,
                    style: {
                        fontSize: "2.1667rem"
                    }
                },
                xAxis: {
                    labels: {
                        enabled: false
                    },
                    lineWidth: 2,
                    gridLineWidth: 0,   //线宽
                    tickLength: 0,      //刻度
                    lineColor: '#646464',
                    zones: {}
                },
                yAxis: {
                    title: {
                        text: null
                    },

                    labels: {
                        style: {
//                            fontSize:'2.1667rem'
                        }

                    },
                    tickPositions: arr3,
                    gridLineWidth: 0,     //不显示横条

                    plotLines: [{
                        color: '#CCCCCC',            //线的颜色，定义为红色
                        dashStyle: 'ShortDash',//标示线的样式，默认是solid（实线），这里定义为长虚线
                        value: avg,                //定义在哪个值上显示标示线，这里是在x轴上刻度为3的值处垂直化一条线
                        width: 1,                 //标示线的宽度，2px    //平均线
                        label: {
                            text: avg,     //标签的内容
                            align: 'right',                //标签的水平位置，水平居左,默认是水平居中center
                            x: 10, //标签相对于被定位的位置水平偏移的像素，重新定位，水平居左10px
                            style: {
                                color: '#F58F62',
                                fontSize: '20'
                            }
                        }
                    }],
                    lineWidth: 2, //y轴线的宽度
                    tickInterval: 1, //y轴线 刻度与刻度之间相差的值,这里是相差1
                    lineColor: '#646464',  //坐标轴颜色
//                    offset:10
                },
                plotOptions: {
                    line: {
                        dataLabels: {
                            enabled: false
                        },
                        fontSize: '20',
                        enableMouseTracking: false
                    }
                },
                tooltip: {
                    enabled: false
                },
                series: [{
                    name: '打分题',
                    data: answer_result,
//                    data:[2,3,4,5,6,7,8,5,6,2,1,2,4,10,9,10,5],
                    showInLegend: false,
                    color: '#F58F62',
                    lineWidth: 0,
                    marker: {
                        radius: 2   //点的大小
                    }
                }],
                credits: {
                    enabled: false // 禁用版权信息
                }
            });

        }

    });
</script>